<!DOCTYPE html>
<html>
  <head>
    <title>字典管理</title>
    <#include "/inc/base-style.ftl">
  </head>
  <body class="${bodyClass}">
    <div class="wrapper">
      <!-- Main Header -->
     <#include "/inc/main-header.ftl">
      <!-- Left side column. contains the logo and sidebar -->
       <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <#include "/inc/slidebar-menu.ftl">
        </section>
        <!-- /.sidebar -->
      </aside>

   <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
			字典项列表	 
          </h1>
        </section>

        <!-- Main content -->
        <section class="content">

		<div class="box box-primary">
			<div class="box-header with-border">
				<h3 class="box-title"></h3>
				<a id="dict-create-btn" href="javascript:;" class="btn btn-success pull-left">新建字典项</a>
				<div class="box-tools">
					<div class="input-group" style="width: 150px;">
						<input type="text" name="table_search" class="form-control input-sm pull-right" placeholder="搜索" />
						<div class="input-group-btn">
							<button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
						</div>
					</div>
				</div>
			</div><!-- /.box-header -->
			<div class="box-body">
				<table id="example" class="table table-hover">
					<thead>
						<tr>
							<th width="20">ID</th>
							<th width="40">父id</th>
							<th width="40">分类</th>
							<th width="50">键值</th>
							<th width="50">名称</th>
							<th width="80">描述</th>
							<th width="70">是否有效</th>
							<th width="40">排序</th>
							<th width="120">标记描述</th>
							<th width="120">创建时间</th>
							<th width="120">修改时间</th>
							<th width="80">操作</th>
						</tr>
					</thead>	
					<tbody>
						<#list list as dict>
						<tr data-uid="${dict.id}" data-uname="${dict.id}" >
							<td>${dict.id}</td>
							<td>${dict.parentItemId}</td>
							<td>${dict.category}</td>
							<td>${dict.itemKey}</td>
							<td>${dict.itemName}</td>
							<td>${dict.itemDescription}</td>
							<td>${dict.isValidStr}</td>
							<td>${dict.itemSort}</td>
							<td>${dict.remark}</td>
							<td>${dict.createTime?string("yyyy-MM-dd HH:mm:ss")}</td>
							<td>${dict.updateTime?string("yyyy-MM-dd HH:mm:ss")}</td>
							<td>
								<a href="javascript:;" class="btn btn-xs btn-primary edit-btn">编辑</a> 
								<a href="javascript:;" class="dict-del-btn btn btn-xs btn-danger">删除</a>
							</td>
						</tr>
						</#list>
					</tbody>
				</table>
			</div>
			<div class="box-footer">
			<!--	<a id="dict-create-btn" href="javascript:;" class="btn btn-success pull-left">新建字典项</a> -->
				<@zhd.page pm url />
			</div>
		</div>

        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
    <#include "/inc/main-footer.ftl">
   <!-- Control Sidebar -->
      <!-- /.control-sidebar -->
      <!-- Add the sidebar's background. This div must be placed
           immediately after the control sidebar -->
      
    </div><!-- ./wrapper -->

	<div class="modal fade" id="dict-create-modal" tabindex="-1" role="dialog">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<form id="dict-create-form" action="/admin/adminAdd" method="post">
					<div id="dict-create-box" class="box box-primary box-solid">
						<div class="box-header with-border">
							<h3 class="box-title dict-create-title"></h3>
						</div><!-- /.box-header -->
						<div class="box-body">
							<div id="dict-create-msg" class="alert alert-danger alert-dismissable">
								<p></p>
							</div>
							<div class="row">
								<div class="col-md-6">
									<form id="dict-create-form" class="form-inline" role="form">
										
									<!--	<div class="form-group">
											<label>id</label>
											<input id="id" name="id" type="text" class="form-control" placeholder=""/>
										</div>   -->
										<div class="form-group">
											<input id="id" name="id" type="hidden" class="form-control" placeholder=""/>
											<input id="createTime" name="createTime" type="hidden" class="form-control" placeholder=""/>
											<input id="updateTime" name="updateTime" type="hidden" class="form-control" placeholder=""/>
										</div>
										<div class="form-group">
											<label>父id</label>
											<select class="form-control" id="parentItemId" name="parentItemId" > 
										      <option value="">全部</option> 
										      <#list pids as dict>
										      <option value="${dict.id}">${dict.itemName}</option> 
										      </#list>
										     </select>
										</div>
										<div class="form-group">
											<label>分类</label>
											<input id="category" name="category" type="text" class="form-control" placeholder=""/>
										</div>
											<div class="form-group">
											<label>键值</label>
											<input id="itemKey" name="itemKey" type="text" class="form-control" placeholder=""/>
										</div>
										<div class="form-group">
											<label>名称</label>
											<input id="itemName" name="itemName" type="text" class="form-control" placeholder=""/>
										</div>
										<div class="form-group">
											<label>描述</label>
											<input id="itemDescription" name="itemDescription" type="text" class="form-control" placeholder=""/>
										</div>
										<div class="form-group">
											<label>是否有效</label>
											   <select class="form-control" id="isValid" name="isValid" > 
											      <option value ="1" >是</option> 
											      <option value ="0" >否</option> 
											    </select>
										</div>
										<div class="form-group">
											<label>排序</label>
											<input id="itemSort" name="itemSort" type="text" class="form-control" placeholder=""/>
										</div>
										<div class="form-group">
											<label>标记描述</label>
											<input id="remark" name="remark" type="text" class="form-control" placeholder=""/>
										</div>
									</form>
								</div>
							</div>

						</div><!-- /.box-body -->
						<div class="box-footer">
							<a href="javascript:;" class="btn btn-success save-btn">保存</a>
							<a href="javascript:;" class="btn btn-default cancel-btn">取消</a>
						</div>
						<div class="overlay">
							<i class="fa fa-refresh fa-spin"></i>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>

	<#include "/inc/base-script.ftl">
	<script src="${staticPath}/plugins/iCheck/icheck.min.js"></script>
	<script src="${staticPath}/crm/dict/core/tagbox/js/tagbox.js"></script>
	<script src="${staticPath}/crm/dict/js/main.js"></script>

  </body>
</html>

